package com.yjd.comm.sms.service;

import java.util.List;
import java.util.Map;

import com.yjd.comm.base.model.PagerModel;
import com.yjd.comm.sms.model.SmsContentModel;
import com.yjd.comm.sms.model.TempSendSmsModel;

/**
 * 短信服务接口
 * 
 * @author ready
 * @date 2014-8-11
 */
public interface ISmsService {
	/**
	 * 根据短信的id获取短信信息
	 * 
	 * @param idSmsContent
	 * @return
	 * @throws Exception
	 */
	public SmsContentModel getSmsContent(Long idSmsContent) throws Exception;

	/**
	 * 发送短信（外部接口只能调用该方法发送短信）
	 * 
	 * @param model
	 * @return 是否成功
	 * @throws Exception
	 */
	public boolean sendSms(TempSendSmsModel tempSendSmsModel) throws Exception;
	
	/**
	 * 发送短信（外部接口只能调用该方法发送短信）
	 * 
	 * @param model
	 * @throws Exception
	 */
	public void sendSmsList(List<TempSendSmsModel> list) throws Exception;

	/**
	 * 获取待发送的短信列表
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("rawtypes")
	public List<SmsContentModel> getWaitSendSmsList(Map paramMap)
			throws Exception;

	/**
	 * 根据文件服务id删除对象
	 * 
	 * @param idFsService
	 *            文件服务id
	 * @return 是否成功
	 * @throws Exception
	 */
	public boolean delete(Long idSmsContent) throws Exception;

	/**
	 * 更新
	 * 
	 * @param model
	 * @return 是否成功
	 * @throws Exception
	 */
	public boolean update(SmsContentModel smsContentModel) throws Exception;

	/**
	 * 将sms移到smsLog表中
	 * 
	 * @param idSmsContents
	 * @throws Exception
	 */
	public void moveSmsToSmsLog(List<Long> idSmsContents) throws Exception;

	/**
	 * 获取待发送短信表的数据
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public List<SmsContentModel> getSmsContentModels(
			Map paramMap) throws Exception;

	/**
	 * 发送并处理，提供给定时器发送短信用
	 * 
	 * @param smsContentModel
	 */
	public void smsSendAndDisponse(SmsContentModel smsContentModel)
			throws Exception;

	/**
	 * 获取短信分页数据
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public PagerModel getSmsPager(Map paramMap)
			throws Exception;

	/**
	 * 获取所有短信
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public long getSmsAllListCount(Map paramMap)
			throws Exception;

	/**
	 * 获取所有短信
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public List<SmsContentModel> getSmsAllList(Map paramMap)
			throws Exception;
}
